home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / Q-R / RR⁄Tabby Source Code.cpt / SunDial 2.1.source < prev    next >
Text File  |  1990-05-25  |  33KB  |  1,102 lines

  1.  
  2.      ' Code by:      Mike Lininger
  3.      '               385 Bowling Green Place 
  4.      '               Gahanna, Ohio  43230
  5.      '               (614) 471-6209 (BBS)
  6.  
  7. 5-25-90
  8.  
  9. I am making most of my code available to anyone interested in developing 
  10. their own Second Sight/Tabby utilities.  This source is not designed to be 
  11. compiled and run.  It is missing key functions and pieces of code that are 
  12. Copyright me and others, that are not to be released at this time. 
  13.  
  14. This code is for example purposes only.  It illustrates various ways of reading
  15. writing and process data from a variety of SS/Tabby files.  It illustrates
  16. the use of Block Reads and Indexes amoung other things.
  17.  
  18. If you use any portion of this code you must abide by two rules, or you
  19. void the agreement that I am making with you and are subject what the law
  20. dictates.
  21.  
  22. They are simple. 
  23.  
  24. 1.  If you us any of this code you must give Michael Lininger and Lininger 
  25. Technology credit in both the program and the documentation.
  26.  
  27. 2.  It is agreed I am to receive a free copy of the program whether it is 
  28. free, sharware or commercial.
  29.  
  30. Now you must read on a little further and we will be done.
  31.  
  32. A little history on why I choose ZBasic as the root for my utilities.
  33. I use to be one of those people that would smirk every time some mentioned
  34. they were using BASIC (until 3 years ago I and others had ever right to
  35. smirk) and would say how nice.  But thought yeh!  Real programmers only use
  36. C or Assembler.
  37.  
  38. Then came along Microsofts QuickBasic for the IBM.  This baby was hot 
  39. it gave you all features of C and Pascal, plus core logic of Assembler, 
  40. all packaged into a neat super easy to learn and use package.  This cut out
  41. months of development work plus the finial applications were a hell of a lot 
  42. better looking, cause you could do so much in a short period of time.  
  43. This set the tide for a new generation of Basic's.  Zedcor introduced ZBasic 
  44. for the mac, which gave complete control over the toolbox plus it compiled 
  45. into nice neat assembly and was fast. 
  46.  
  47. ZBasic I have found to be extremely powerful and fast, in most cases it 
  48. matches or out performs the best C compilers out there. Now when someone 
  49. says heh I finished this great C project that I have been working on for 6 
  50. months, I now smirk and say how nice.  But think yeh!  I could have done 
  51. the same thing in 1/4 the time and saved you 300,000.00 and ended up with 
  52. a lot cleaner and more professional looking product all at the cost of an 
  53. extra 14k of file size.
  54.  
  55. The only draw back to ZBasic is it lack of Data structures, but this is
  56. made up for the use of Indexes.  C programmer salivate all over the place
  57. at the mention of theses babies.  They give you performance you never dreamed
  58. of.  Now of we could just get Zedcor to give us a dozen more, WOW.
  59.  
  60. Moral of the story - DO NOT EVER underestimate the POWER of Compiled Basic.
  61.  
  62. Have at it.  I hope a lot of people will use this as a jumping off point
  63. and dive into creating a flood of new SS/Tabby utilities.
  64.  
  65. I can be reached on the networks if you have questions.
  66.  
  67.         614-471-6209 9600 baud
  68.         614-471-5733 2400 baud
  69.  
  70.         M.Lininger  Genie
  71.         Mike Lininger FidoNet (Tabby, RRH, MANSION echoes)
  72.         Mike Lininger 1:226/200
  73.         Mike Lininger via cmhGate - Net 226 fido<=>uucp gateway Col, OH
  74.         UUCP: ...!ous-cis!n8emr!cmhgate!200.2!Mike.Lininger
  75.         INET: Mike.Lininger@p2.f200.n226.z1.FIDONET.ORG
  76.  
  77.  
  78.  
  79.     ' Code is in ZBasic 5.0
  80.     ' Settings 8,2,4,5,50,mklt,TEXT,LONG,Space Req. after Keywords
  81.     '    MKLs - Creator 
  82.     '    TSun - Type 
  83.     '    SunDial 2.1  Last Modified 7-23-89
  84.     '    Resources STR's  1770-1771
  85.  
  86.  
  87.      ' To Prevent your application from say "You will not be able to print"
  88.      ' if it does not find a Print Driver in your system do the following
  89.      ' on the finial campiled application.  DO NOT DO IT ON ZBASIC ITSELF.
  90.      ' Use FEDIT do a Hex search for 50EDFD3C and change 50ED to FD3C.
  91.  
  92.      ' Sets up application.  Turns off Startup Window, Sets Default Mouse
  93.      WINDOW OFF
  94.      COORDINATE WINDOW
  95.      DEF MOUSE=-1
  96.      WIDTH -2
  97.      FLUSHEVENTS
  98.  
  99.      DIM T%,L%,B%,R%,MY%,MX%           ' Required for Toolbox calls
  100.      DIM 80 Tabby$(100)
  101.      DIM a$(100)
  102.      Field%=1:ERROR=0:Cur%=128
  103.      RRHost$="Red Ryder Host"
  104.  
  105.      ' convert string resource to a string, handle must be passed to this function
  106.  
  107.      LONG FN ReturnString$(SHndl&)
  108.      
  109.              FByte%=PEEK(PEEK LONG(SHndl&))
  110.              String$=""
  111.       
  112.              FOR I%=1 TO FByte%
  113.                     String$=String$+CHR$(PEEK(PEEK LONG(SHndl&)+I%))
  114.              NEXT I%
  115.      
  116.      END FN = String$
  117.  
  118.  
  119.      WINDOW 1,"Aurora Borealis BBS - 614-471-6209",(12,75)-(500,198),17
  120.      GOSUB "Cursor_Spin"
  121.      GOSUB "Build_Window"
  122.      GOSUB "Cursor_Spin"
  123.  
  124.      ScreenLine$="Loading Resources .....
  125.      GOSUB "Screen_Log_Display"
  126.      GOSUB "Cursor_Spin"
  127.         GOSUB "Get_Resource_Values"
  128.      GOSUB "Cursor_Spin"
  129.  
  130.      ' Checks to see if mouse key is down, if so then goto configure menu
  131.   
  132.      MOUSE ON
  133.      DEF MOUSE = 0
  134.      Hold%=MOUSE(3)
  135.      LONG IF Hold% <> 0
  136.  
  137.          GOSUB "Cursor_Spin"
  138.          DEF MOUSE = -1
  139.          WINDOW CLOSE #1
  140.          GOSUB "Configure Menu"
  141.          IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
  142.          CURSOR 0
  143.          END
  144.  
  145.      END IF
  146.      MOUSE OFF
  147.      DEF MOUSE = -1
  148.  
  149.      IF LEN(BBSFolder$)<=1 THEN BBSFolder$=""
  150.      NextLaunch$=BBSFolder$+"Launch.Next"
  151.      TabbyNet$=BBSFolder$+"TabbyNet"
  152.      IF RRHost$="" THEN RRHost$="Red Ryder Host"
  153.      RRHost$=BBSFolder$+RRHost$
  154.      ConfigFile$=BBSFolder$+"Config"
  155.      NextEvent$=BBSFolder$+"Next Event
  156.  
  157.      GOSUB "Cursor_Spin"
  158.      ScreenLine$="Checking "+ConfigFile$+"/"+NextEvent$
  159.      GOSUB "Screen_Log_Display"
  160.      GOSUB "Cursor_Spin"
  161.      GOSUB "Check_Valid_SystemFiles"
  162.      GOSUB "Cursor_Spin"
  163.      
  164.      LONG IF FileErr4%=255
  165.           ScreenLine$="File Not Found - "+ConfigFile$
  166.           GOSUB "Screen_Log_Display"
  167.           ErrLine$ = "<<Error 01>> *"+ConfigFile$+"* Does not Exist at end of Indicated Path! or 1.4 version! or Damaged!"
  168.           GOSUB "Error Log"
  169.              GOTO "Update_Skip"
  170.      END IF
  171.  
  172.      LONG IF FileErr5%=255
  173.           ScreenLine$="File Not Found - "+NextEvent$
  174.           GOSUB "Screen_Log_Display"
  175.           ErrLine$ = "<<Error 02>> *"+NextEvent$+"* Does not Exist at end of Indicated Path! "
  176.           GOSUB "Error Log"
  177.              GOTO "Update_Skip"
  178.      END IF
  179.  
  180.  
  181. "Set_New_Time"
  182.  
  183.      GOSUB "Cursor_Spin"
  184.      ScreenLine$="* Calculating New Launch Time *"
  185.      GOSUB "Screen_Log_Display"
  186.  
  187.      Address%=VAL("&H20C")
  188.      Seconds1904&=PEEK LONG(Address%):TDHold$=TIME$
  189.      GOSUB "Cursor_Spin"
  190.  
  191.      LONG IF NextEventError%=0
  192.  
  193.           Hr%=VAL(LEFT$(TDHold$,2))
  194.           Mn%=VAL(MID$(TDHold$,4,2))
  195.  
  196.           LONG IF TabbyHour% < Hr% 
  197.  
  198.                LONG IF TabbyMinute% < Mn%
  199.                     a%=((24-Hr%)+TabbyHour%)-1
  200.                XELSE
  201.                     a%=(24-Hr%)+TabbyHour%
  202.                END IF
  203.                GOSUB "Cursor_Spin"
  204.  
  205.           XELSE
  206.  
  207.                LONG IF TabbyMinute% < Mn%
  208.                     a%=(TabbyHour%-Hr%)-1
  209.                XELSE
  210.                     a%=TabbyHour%-Hr%
  211.                END IF
  212.                GOSUB "Cursor_Spin"
  213.  
  214.           END IF
  215.  
  216.           LONG IF TabbyMinute% < Mn%
  217.                b%=(60-Mn%)+TabbyMinute%
  218.           XELSE
  219.                b%=TabbyMinute%-Mn%
  220.           END IF
  221.  
  222.           GOSUB "Cursor_Spin"
  223.           NewSeconds&=a%*3600
  224.           NewSeconds&=NewSeconds&+(b%*60)
  225.           NewLaunchTime&=Seconds1904&+NewSeconds&
  226.           CALL IUTIMESTRING (NewLaunchTime&,1,RTime$)
  227.           CALL IUDATESTRING (NewLaunchTime&,1,RDate$)
  228.                 l%=LEN(RTime$)
  229.           LONG IF l% >= 11 
  230.                      Sc%=VAL(MID$(RTime$,7,2))
  231.           XELSE
  232.                      Sc%=VAL(MID$(RTime$,6,2))
  233.           END IF
  234.           NewLaunchTime&=NewLaunchTime&-Sc%
  235.           GOSUB "Cursor_Spin"
  236.                         
  237.                 CalErr%=0
  238.                 ON ERROR GOSUB "ConfigFile_Error"
  239.                 IF CalErr%=255 THEN GOTO "Update_Skip"
  240.                OPEN "R",1,ConfigFile$,348
  241.                    RECORD #1,0,308
  242.                    WRITE #1,NewLaunchTime&
  243.                  CLOSE #1
  244.            ON ERROR RETURN
  245.            GOSUB "Cursor_Spin"
  246.            ScreenLine$="* New Launch Time is - "+RTime$+" *"
  247.            GOSUB "Screen_Log_Display"
  248.  
  249.      END IF
  250.  
  251. "Update_Skip"
  252.  
  253.      GOSUB "Cursor_Spin"
  254.      GOSUB "Tabby_Launch"
  255.      ErrLine$ = "<<Error 00>> Everything Failed to Launch, Dropping to Finder "
  256.      GOSUB "Error Log"
  257.      IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
  258.      CURSOR 0
  259.      END 
  260.  
  261.  
  262.  
  263.  
  264. "ConfigFile_Error"
  265.  
  266.      GOSUB "Cursor_Spin"
  267.      CalErr%=255
  268.      ErrLine$ = "<<Error"+STR$(ERROR)+">> *"+ConfigFile$+"* Problems with this file! (Read/Write)!  "
  269.      GOSUB "Error Log"
  270.      ERROR=0
  271.      RETURN
  272.  
  273.  
  274. "Build_Window"
  275.  
  276.      GOSUB "Cursor_Spin"
  277.      CALL PENNORMAL
  278.  
  279.      LONG IF WINDOW(0)=1
  280.           T=40:L=14:B=80:R=480:PEN 1,1,1,8
  281.           CALL PAINTRECT(T)
  282.           T=36:L=11:B=74:R=476:PEN ,,,,19
  283.           CALL PAINTRECT(T)
  284.           PEN ,,,,0
  285.           CALL FRAMERECT(T)
  286.           T=69:L=345:B=114:R=474
  287.           CALL PAINTROUNDRECT(T,16,16)
  288.           T=66:L=341:B=110:R=471:PEN ,,,,19
  289.           CALL PAINTROUNDRECT(T,16,16)
  290.           PEN ,,,,0
  291.           CALL FRAMEROUNDRECT(T,16,16)
  292.           TEXT 0,12,0,0:T=72:L=342:B=104:R=467:TEMP$="Written By"+CHR$(13)+"Michael Lininger"
  293.           CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T, 1)
  294.           T=17:L=20:B=43:R=136
  295.           CALL PAINTROUNDRECT(T,16,16)
  296.           T=13:L=17:B=39:R=133:PEN ,,,,19
  297.           CALL PAINTROUNDRECT(T,16,16)
  298.           PEN ,,,,0
  299.           CALL FRAMEROUNDRECT(T,16,16)
  300.           T=18:L=30:B=34:R=119:TEMP$="Sundial 2.1"
  301.           CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T, 1)
  302.      END IF
  303.  
  304.      CALL PENNORMAL
  305.      GOSUB "Cursor_Spin"
  306.      RETURN
  307.  
  308.  
  309.  
  310. "Get_Resource_Values"
  311.  
  312.      ' This module Gets default values from STR resources
  313.      ' 1770 = BBS Application Name
  314.      ' 1771 = Pathname To BBS Folder
  315.  
  316.      ' Find out what this application is named
  317.  
  318.       GOSUB "Cursor_Spin"
  319.       CurApName=&H910
  320.       CurApName$=""
  321.       GOSUB "Cursor_Spin"
  322.  
  323.       FOR I%=1 TO PEEK(CurApName)
  324.                  CurApName$=CurApName$+CHR$(PEEK(CurApName+I%))
  325.       NEXT I%
  326.  
  327.       rscs%=0:' ResFile is Closed
  328.       Refnum%=FN OPENRESFILE(CurApName$)
  329.       Errnum%=FN RESERROR
  330.  
  331.       LONG IF Errnum% <> 0
  332.            ScreenLine$="Resource Problem with "+CurApName$
  333.            GOSUB "Screen_Log_Display"
  334.            ErrLine$ = "<<Error RS>> *"+CurApName$+"* has a resource fork problem, Can't Open, Find STRs "
  335.            GOSUB "Error Log"
  336.            GOSUB "Tabby_Launch"
  337.            ErrLine$ = "             *RS* That is it folks, I am confuzzzzzed dropping to Finder *** "
  338.            GOSUB "Error Log"
  339.            ScreenLine$="***** Dropping to Finder *****"
  340.            GOSUB "Screen_Log_Display"
  341.            FOR j% = t TO 1000
  342.                 GOSUB "Cursor_Spin"
  343.            NEXT j%
  344.            CURSOR 0
  345.            IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
  346.            END
  347.       END IF 
  348.  
  349.      rscs%=1:' ResFile is Open
  350.      FOR ResourceCount%=1770 TO 1771
  351.  
  352.           GOSUB "Cursor_Spin"
  353.           StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
  354.  
  355.           LONG IF StrHnd&=0
  356.  
  357.               ' Setting up string resource to save default strs
  358.               IF ResourceCount% = 1770 THEN Str$="Red Ryder Host":RRHost$=Str$
  359.               IF ResourceCount% = 1771 THEN Str$=":":BBSFolder$=Str$
  360.               
  361.                  StrHnd&=FN NEWSTRING(Str$)
  362.               CALL ADDRESOURCE (StrHnd&,CVI("STR "),ResourceCount%,"")
  363.        
  364.           XELSE
  365.  
  366.                   StrHnd&=FN GETSTRING(ResourceCount%)
  367.  
  368.           END IF
  369.  
  370.           ' Convert STRs into useful limit values and pathnames
  371.  
  372.           Default$=FN ReturnString$(StrHnd&)
  373.      
  374.          IF ResourceCount% = 1770 THEN RRHost$=Default$
  375.          IF ResourceCount% = 1771 THEN BBSFolder$=Default$
  376.  
  377.      NEXT ResourceCount%
  378.      GOSUB "Cursor_Spin"
  379.  
  380. RETURN
  381.  
  382.  
  383.  
  384.  
  385.  
  386. "Tabby_Launch"
  387.  
  388.      GOSUB "Cursor_Spin"
  389.      EventCount%=0:ERROR=0
  390.  
  391.      ScreenLine$="Checking for Launch.Next File"
  392.      GOSUB "Screen_Log_Display"
  393.  
  394.      GOSUB "Cursor_Spin"
  395.      OPEN "R",1,NextLaunch$
  396.           Length&=LOF(1,1)
  397.      CLOSE #1
  398.      GOSUB "Cursor_Spin"
  399.  
  400.      LONG IF Length&=0
  401.           ScreenLine$="File Not Found "+NextLaunch$
  402.           GOSUB "Screen_Log_Display"
  403.           ErrLine$ = "<<Error 03>> *"+NextLaunch$+"* Does not Exist at end of Indicated Path! "
  404.           GOSUB "Error Log"
  405.           KILL NextLaunch$
  406.           GOTO "Launch_Sequence_Start"
  407.      END IF
  408.  
  409.      GOSUB "Cursor_Spin"
  410.      ScreenLine$="Loading Event Chain"
  411.      GOSUB "Screen_Log_Display"
  412.      GOSUB "Cursor_Spin"
  413.  
  414.      DEF OPEN "TEXTQED1"
  415.      OPEN "I",1,NextLaunch$
  416.  
  417.      WHILE NOT EOF(1)
  418.  
  419.           GOSUB "Cursor_Spin"
  420.           INPUT #1,Tabby$(EventCount%)
  421.           EventCount%=EventCount%+1
  422.  
  423.      WEND
  424.      CLOSE #1
  425.      GOSUB "Cursor_Spin"
  426.  
  427.      EventCount%=EventCount%-1
  428.  
  429.      LONG IF EventCount% < 1
  430.           GOSUB "Cursor_Spin"
  431.           ScreenLine$="Last Event Deleting Launch.Next "
  432.           GOSUB "Screen_Log_Display"
  433.           GOSUB "Cursor_Spin"
  434.           KILL NextLaunch$
  435.      XELSE
  436.           ScreenLine$="Updating Launch.Next File "
  437.           GOSUB "Screen_Log_Display"
  438.           GOSUB "Cursor_Spin"
  439.           DEF OPEN "TEXTQED1"
  440.           OPEN "O",1,NextLaunch$
  441.               FOR Count%= 1 TO EventCount%
  442.                    GOSUB "Cursor_Spin"
  443.                    PRINT #1,Tabby$(Count%);
  444.                    GOSUB "Cursor_Spin"
  445.                    LONG IF Tabby$(Count%+1) = ""
  446.                         PRINT #1,CHR$(13);
  447.                    XELSE
  448.                         PRINT #1,",";
  449.                    END IF
  450.               NEXT Count%
  451.           CLOSE #1
  452.     END IF
  453.  
  454. "Launch_Sequence_Start"
  455.  
  456.      LaunchFile$=BBSFolder$+Tabby$(0)
  457.  
  458.      IF UCASE$(Tabby$(0))="BBS" THEN LaunchFile$=RRHost$
  459.  
  460.      GOSUB "Check_Valid_Filenames"
  461.  
  462.      ON ERROR GOSUB "Tabby_Launch_Error"
  463.  
  464.      LONG IF Tabby$(0) <> ""
  465.  
  466.           GOSUB "Cursor_Spin"
  467.           ScreenLine$="Launching - "+LaunchFile$
  468.           GOSUB "Screen_Log_Display"
  469.  
  470.           CURSOR 0
  471.           LONG IF FileErr1%=255
  472.                ScreenLine$="File Not Found - "+LaunchFile$
  473.                GOSUB "Screen_Log_Display"
  474.                ErrLine$ = "<<Error 04>> *"+LaunchFile$+"* Does not Exist at end of Indicated Path! "
  475.                GOSUB "Error Log"
  476.                ErrLine$ = "             "+"Attempt is being Made to Run *"+RRHost$+"* "
  477.                GOSUB "Error Log"
  478.  
  479.                ScreenLine$="Launching BBS - "+RRHost$
  480.                GOSUB "Screen_Log_Display"
  481.                LONG IF FileErr2%=0
  482.                     ScreenLine$="BBS Not Found - "+RRHost$
  483.                     GOSUB "Screen_Log_Display"
  484.                     ErrLine$ = "<<Error 05>> *"+RRHost$+"* Does not Exist at end of Indicated Path! "
  485.                     GOSUB "Error Log"
  486.                     ErrLine$ = "             "+"Attempt is being Made to Run *"+TabbyNet$+"* "
  487.                     GOSUB "Error Log"
  488.  
  489.                     ScreenLine$="Launching TabbyNet - "+TabbyNet$
  490.                     GOSUB "Screen_Log_Display"
  491.                     LONG IF FileErr3%=255
  492.                          ScreenLine$="TabbyNet Not Found - "+TabbyNet$
  493.                          GOSUB "Screen_Log_Display"
  494.                          ErrLine$ = "<<Error 06>> *"+TabbyNet$+"* Does not Exist at end of Indicated Path! "
  495.                          GOSUB "Error Log"
  496.                          ErrLine$ = "             *** That is it folks, I am confuzzzzzed dropping to Finder *** "
  497.                          GOSUB "Error Log"
  498.                          ScreenLine$="***** Dropping to Finder *****"
  499.                          GOSUB "Screen_Log_Display"
  500.                          FOR j%=1 TO 1000
  501.                               GOSUB "Cursor_Spin"
  502.                          NEXT j%
  503.                          CURSOR 0
  504.                          IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
  505.                          END
  506.                     XELSE
  507.                          RUN TabbyNet$
  508.                          END
  509.                     END IF
  510.                XELSE
  511.                     RUN RRHost$
  512.                     END
  513.                END IF
  514.           XELSE
  515.                RUN LaunchFile$
  516.                END
  517.           END IF
  518.  
  519.       XELSE
  520.  
  521.           CURSOR 0
  522.           ScreenLine$="Last Event Launching BBS - "+RRHost$
  523.           GOSUB "Screen_Log_Display"
  524.           LONG IF FileErr2%=255
  525.                ScreenLine$="BBS Not Found - "+RRHost$
  526.                GOSUB "Screen_Log_Display"
  527.                ErrLine$ = "<<Error 07>> *"+RRHost$+"* Does not Exist at end of Indicated Path! "
  528.                GOSUB "Error Log"
  529.                ErrLine$ = "             "+"Attempt is being Made to Run *"+TabbyNet$+"* "
  530.                GOSUB "Error Log"
  531.  
  532.                ScreenLine$="Launching TabbyNet - "+TabbyNet$
  533.                GOSUB "Screen_Log_Display"
  534.                LONG IF FileErr3%=255
  535.                     ScreenLine$="TabbyNet Not Found - "+TabbyNet$
  536.                     GOSUB "Screen_Log_Display"
  537.                     ErrLine$ = "<<Error 08>> *"+TabbyNet$+"* Does not Exist at end of Indicated Path! "
  538.                     GOSUB "Error Log"
  539.                     ErrLine$ = "             *** That is it folks, I am dropping to Finder *** "
  540.                     GOSUB "Error Log"
  541.                     ScreenLine$="***** Dropping to Finder *****"
  542.                     GOSUB "Screen_Log_Display"
  543.                     FOR j%=1 TO 1000
  544.                          GOSUB "Cursor_Spin"
  545.                     NEXT j%
  546.                     CURSOR 0
  547.                     IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
  548.                     END
  549.                XELSE
  550.                     RUN TabbyNet$
  551.                     END
  552.                END IF
  553.           XELSE
  554.                RUN RRHost$
  555.                END
  556.           END IF
  557.  
  558.      END IF
  559.  
  560.      CURSOR 0
  561.      ErrLine$ = "<<Error 99>> "+" Really Big ERROR, Sequence Abort, attempting to Recover "
  562.      GOSUB "Error Log"
  563.      ScreenLine$="Launch Sequence Error, Running "+RRHost$
  564.      GOSUB "Screen_Log_Display"
  565.      LONG IF FileErr2%=255
  566.           ScreenLine$="BBS Not Found - "+RRHost$
  567.           GOSUB "Screen_Log_Display"
  568.           ErrLine$ = "<<Error 09>> *"+RRHost$+"* Does not Exist at end of Indicated Path! "
  569.           GOSUB "Error Log"
  570.           ErrLine$ = "             "+"Attempt is being Made to Run *TabbyNet* "
  571.           GOSUB "Error Log"
  572.  
  573.           ScreenLine$="Launching TabbyNet - "+TabbyNet$
  574.           GOSUB "Screen_Log_Display"
  575.           
  576.           LONG IF FileErr3%=255
  577.                ScreenLine$="TabbyNet Not Found - "+TabbyNet$
  578.                GOSUB "Screen_Log_Display"
  579.                ErrLine$ = "<<Error 10>> *"+TabbyNet$+"* Does not Exist at end of Indicated Path! "
  580.                GOSUB "Error Log" 
  581.                ErrLine$ = "             *** That is it folks, I am confuzzzzzzed @?$-&!#, dropping to Finder *** "
  582.                GOSUB "Error Log"
  583.                ScreenLine$="***** Dropping to Finder *****"
  584.                GOSUB "Screen_Log_Display"
  585.                FOR j%=1 TO 1000
  586.                    GOSUB "Cursor_Spin"
  587.                NEXT j%
  588.                CURSOR 0
  589.                IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
  590.                END
  591.           XELSE
  592.                RUN TabbyNet$
  593.                END
  594.           END IF
  595.           RUN RRHost$
  596.           END
  597.      END IF
  598.  
  599.      ON ERROR RETURN
  600.  
  601.      RETURN  
  602.  
  603.  
  604. "Tabby_Launch_Error"
  605.  
  606.      GOSUB "Cursor_Spin"
  607.      ScreenLine$="** Dropping to Finder, Launch Error **"
  608.      GOSUB "Screen_Log_Display"
  609.      GOSUB "Cursor_Spin"
  610.      ErrLine$="<<Error"+STR$(ERROR)+">> Launch Error Possible Causes are as Follows: "
  611.      GOSUB "Error Log"
  612.      GOSUB "Cursor_Spin"
  613.      ErrLine$="<<---------- BBS String - "+RRHost$+" "
  614.      GOSUB "Error Log"
  615.      GOSUB "Cursor_Spin"
  616.      ErrLine$="<<-- Launch.Next String - "+NextLaunch$+" "
  617.      GOSUB "Error Log"
  618.      GOSUB "Cursor_Spin"
  619.      ErrLine$="<<----- TabbyNet String - "+TabbyNet$+" "
  620.      GOSUB "Error Log"
  621.      GOSUB "Cursor_Spin"
  622.      ErrLine$="<<--- BBS Folder String - "+BBSFolder$+" "
  623.      GOSUB "Error Log"
  624.      GOSUB "Cursor_Spin"
  625.      ErrLine$="<<---- CallerLog String - "+CallerLog$+" "
  626.      GOSUB "Error Log"
  627.      GOSUB "Cursor_Spin"
  628.      ErrLine$="<<-- One of the Above is Wrong! - Application Not There! - Invalid Pathname! - Can't Run A File! "
  629.      GOSUB "Error Log"
  630.      GOSUB "Cursor_Spin"
  631.      ErrLine$="<<---- Config File String - "+ConfigFile$+" "
  632.      GOSUB "Error Log"
  633.      GOSUB "Cursor_Spin"
  634.      ErrLine$="<<---- Next Launch String - "+NextLaunch$+" "
  635.      GOSUB "Error Log"
  636.      GOSUB "Cursor_Spin"
  637.      ErrLine$="*    *** Dropping to Finder, I am Confuzzzzzzed @%?$-*$%! "
  638.      GOSUB "Error Log"
  639.      ERROR = 0
  640.      FOR j%=1 TO 1000
  641.          GOSUB "Cursor_Spin"
  642.      NEXT j%
  643.      CURSOR 0
  644.      IF rscs%=1 THEN rscs%=0:CALL CLOSERESFILE(Refnum%)
  645.      END
  646.      RETURN
  647.  
  648.  
  649. "Screen_Log_Display"
  650.  
  651.      GOSUB "Cursor_Spin"
  652.      TEXT 0,12,0,0     
  653.      T=47:L=27:B=63:R=455:TEMP$=ScreenLine$
  654.      CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 1)
  655.      DELAY 1500
  656.      GOSUB "Cursor_Spin"
  657.      RETURN
  658.  
  659.  
  660. "Error Log"
  661.  
  662.      GOSUB "Cursor_Spin"
  663.      DEF OPEN "TEXTTSun"
  664.      OPEN "A",9,"Sundial.Error"
  665.           GOSUB "Cursor_Spin"
  666.           ErrLine$=ErrLine$+TIME$+" "+DATE$
  667.           PRINT #9, ErrLine$
  668.      CLOSE #9
  669.      GOSUB "Cursor_Spin"
  670.      RETURN
  671.  
  672.  
  673.  
  674. "Configure Menu"
  675.  
  676.      WINDOW CLOSE #1
  677.      WND=1:GOSUB "Build Window"
  678.      Field%=1:CURSOR 0
  679.  
  680.      ON DIALOG GOSUB "Handle Dialog"
  681.      DIALOG ON
  682.  
  683. "Loop"
  684.  
  685.     LONG IF Button%=1
  686.          WINDOW CLOSE #1
  687.      CURSOR 0
  688.          RETURN
  689.     END IF
  690.     LONG IF Button%=2
  691.          GOSUB "Resource Update"
  692.          WINDOW CLOSE #1
  693.      CURSOR 0
  694.          RETURN
  695.      END IF
  696.  
  697.      GOTO"Loop"
  698.      DIALOG OFF
  699.  
  700.  
  701. "Handle Dialog"
  702.  
  703.      Act%=DIALOG(0):Ref%=DIALOG(Act%)
  704.  
  705.      IF Act%=3 THEN WINDOW Ref%:RETURN
  706.      LONG IF Act%=1 AND Ref%=1
  707.           Button%=2
  708.      END IF
  709.      LONG IF Act%=1 AND Ref%=2
  710.           Button%=1
  711.      END IF
  712.      LONG IF Act%=6 OR Act%=7
  713.           Field%=Field%+1
  714.           IF Field%>2 THEN Field%=1
  715.           EDIT FIELD #Field%
  716.      END IF
  717.      LONG IF Act%=2
  718.           EDIT FIELD #Ref%
  719.           Field%=Ref%
  720.      END IF
  721.      IF Act%=5 THEN "Format Window"
  722.  
  723.      RETURN
  724.  
  725.   
  726. "Frame Button"
  727.  
  728.      CALL INSETRECT(T%,-4,-4):                ' Expand T,L,B,R
  729.      PEN 3,3,1,8,0:                           ' Reset pensize
  730.      CALL FRAMEROUNDRECT(T%,16,16):           ' Now frame it
  731.      CALL INSETRECT(T%,4,4):CALL PENNORMAL:   ' Restore T,L,B,R
  732.      RETURN
  733.  
  734.  
  735. "Build Window"
  736.  
  737.      IF WND=1 THEN WINDOW 1,"Configure Menu",(17,58)-(475,200),17
  738.      GOSUB "Build Edits" 
  739.      RETURN
  740.  
  741.  
  742. "Format Window"
  743.  
  744. CALL PENNORMAL
  745.  
  746.      LONG IF WINDOW(0)=1
  747.  
  748.           T%=10:L%=100:B%=34:R%=438:PEN 1,1,1,8
  749.           CALL FRAMERECT(T%)
  750.           T%=44:L%=101:B%=68:R%=439
  751.           CALL FRAMERECT(T%)
  752.           T%=83:L%=376:B%=103:R%=435:GOSUB "Frame Button"
  753.           TEXT 0,12,0,0:T%=15:L%=25:B%=31:R%=95:TEMP$="BBS Name:"
  754.           CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
  755.           T%=105:L%=54:B%=121:R%=127:TEMP$="Sundial 2.0"
  756.           CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
  757.           TEXT 3,9,:T%=96:L%=182:B%=120:R%=368:TEMP$="Be sure to include a Colon ':'"+CHR$(13)+"at end of your BBSFolder Path."
  758.           CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
  759.           TEXT 0,12,:T%=49:L%=22:B%=65:R%=95:TEMP$="BBS Folder:"
  760.           CALL TEXTBOX(VARPTR(TEMP$)+1,LEN(TEMP$),T%, 0)
  761.      END IF
  762.  
  763.     TEXT 0,12,0,0 
  764.     CALL PENNORMAL
  765.     RETURN
  766.  
  767.  
  768. "Build Edits"
  769.  
  770.     TEXT ,,0,0
  771.  
  772.     LONG IF WINDOW(0)=1
  773.          TEXT 0,12,
  774.          EDIT FIELD 1,RRHost$,(103,14)-(435,29),3,1
  775.          EDIT FIELD 2,BBSFolder$,(104,48)-(436,63),3,1
  776.          BUTTON 1 ,1," Save ",(376,83)-(435,103),1
  777.          BUTTON 2 ,1,"Cancel",(376,113)-(439,133),1
  778.          EDIT FIELD 1
  779.     END IF
  780.  
  781.     RETURN
  782.  
  783.  
  784. "Resource Update"
  785.  
  786.      GOSUB "Cursor_Spin"
  787.      a$=EDIT$(2)
  788.      Check$=RIGHT$(a$,1)
  789.      LONG IF Check$ <> ":"
  790.           BBSFolder$=a$+":"
  791.           BEEP
  792.           Button%=0
  793.           EDIT FIELD #2,BBSFolder$
  794.           CURSOR 0
  795.           GOTO "Loop"
  796.      END IF
  797.  
  798.      RCount%=0
  799.      FOR ResourceCount%=1770 TO 1771
  800.                
  801.           GOSUB "Cursor_Spin"
  802.           RCount%=RCount%+1
  803.           default$ = EDIT$(RCount%)
  804.           StrHnd&=FN GETRESOURCE(CVI("STR "),ResourceCount%)
  805.           CALL SETSTRING(StrHnd&,default$)
  806.           CALL CHANGEDRESOURCE(StrHnd&)
  807.           CALL UPDATERESFILE(Refnum%)
  808.  
  809.       NEXT ResourceCount%
  810.       GOSUB "Cursor_Spin"
  811.  
  812.       RETURN
  813.  
  814.  
  815.  
  816. "Check_Valid_Filenames"
  817.     
  818.      ErrFile%=0:FileErr1%=0:FileErr2%=0:FileErr3%=0
  819.  
  820.      ON ERROR GOSUB "Filename_Error"
  821.    
  822.      a%=1
  823.      OPEN "I",2,LaunchFile$
  824.      CLOSE #2     
  825.      LONG IF FileErr1%=255
  826.           ErrLine$="<<Error 11>> *"+LaunchFile$+"* Next Event Not Found - Invalid Name or Path "
  827.           GOSUB "Error Log"
  828.           ScreenLine$="File Error <NOT FOUND> *"+LaunchFile$+"* "
  829.           GOSUB "Screen_Log_Display"
  830.      END IF
  831.  
  832.      a%=2
  833.      OPEN "I",2,RRHost$
  834.      CLOSE #2
  835.      LONG IF FileErr2%=255
  836.           ErrLine$="<<Error 12>> *"+RRHost$+"* BBS Not Found - Invalid Name or Path "
  837.           GOSUB "Error Log"
  838.           ScreenLine$="File Error <NOT FOUND> *"+RRHost$+"* "
  839.           GOSUB "Screen_Log_Display"
  840.      END IF
  841.  
  842.      a%=3
  843.      OPEN "I",2,TabbyNet$
  844.      CLOSE #2
  845.      LONG IF FileErr3%=255
  846.           ErrLine$="<<Error 13>> *"+TabbyNet$+"* TabbyNet Not Found - Invalid Name or Path "
  847.           GOSUB "Error Log"
  848.           ScreenLine$="File Error <NOT FOUND> *"+TabbyNet$+"* "
  849.           GOSUB "Screen_Log_Display"
  850.      END IF
  851.  
  852.      ON ERROR RETURN
  853.      RETURN
  854.  
  855.  
  856.  
  857. "Filename_Error"
  858.  
  859.      IF a%=1 THEN FileErr1%=255
  860.      IF a%=2 THEN FileErr2%=255
  861.      IF a%=3 THEN FileErr3%=255
  862.      ERROR=0
  863.  
  864.      RETURN
  865.      
  866.      
  867. "Check_Valid_SystemFiles"
  868.     
  869.      ErrFile%=0:FileErr4%=0:FileErr5%=0:FileErr6%=0
  870.  
  871.      ON ERROR GOSUB "SystemFile_Error"
  872.    
  873.      a%=4
  874.      OPEN "R",2,ConfigFile$
  875.          Length&=LOF(2,1)
  876.      CLOSE #2     
  877.      LONG IF Length&=0
  878.           FileErr4%=255
  879.           ErrLine$="<<Error 14>> *"+ConfigFile$+"* Config File Not Found - Invalid Name or Path! or Missing! or 1.4 version! or Damaged! "
  880.           GOSUB "Error Log"
  881.           ScreenLine$="File Error <NOT FOUND> *"+ConfigFile$+"* "
  882.           GOSUB "Screen_Log_Display"
  883.      XELSE
  884.           FileErr4%=0
  885.           ScreenLine$="* Loading Old Launch Time *"
  886.           GOSUB "Screen_Log_Display"
  887.           OPEN "R",1,ConfigFile$,348
  888.               RECORD #1,0
  889.               READ #1, Ignore$;57
  890.               READ #1, UserLog$;41
  891.               READ #1, CallerLog$;41
  892.               READ #1, MsgPath$;80
  893.               READ #1, Ignore$;89
  894.               READ #1, LaunchTimeOld&
  895.               READ #1, Ignore$;5
  896.               READ #1, SysopName$;31
  897.           CLOSE #1
  898.      END IF
  899.  
  900.      a%=5
  901.      DEF OPEN "TEXTQED1"
  902.      OPEN "I",2,NextEvent$
  903.      CLOSE #2
  904.      LONG IF FileErr5%=255
  905.           ErrLine$="<<Error 15>> *"+NextEvent$+"* NextEvent Not Found - Invalid Name or Path or Missing "
  906.           GOSUB "Error Log"
  907.           ScreenLine$="File Error <NOT FOUND> *"+NextEvent$+"* "
  908.           GOSUB "Screen_Log_Display"
  909.      XELSE
  910.           ScreenLine$="* Loading Old Next Event Time *"
  911.           GOSUB "Screen_Log_Display"
  912.       OPEN "I",2,NextEvent$
  913.                INPUT #2,nEvent$
  914.           CLOSE #2
  915.       TabbyHour%=VAL(LEFT$(nEvent$,2))
  916.           TabbyMinute%=VAL(MID$(nEvent$,3,2))
  917.           TabbySecond%=0
  918.      END IF
  919.      ON ERROR RETURN
  920.      RETURN
  921.  
  922.  
  923.  
  924. "SystemFile_Error"
  925.  
  926.      IF a%=4 THEN FileErr4%=255
  927.      IF a%=5 THEN FileErr5%=255
  928.      ERROR=0
  929.  
  930.      RETURN
  931.  
  932.      
  933.  
  934.  
  935. "Cursor_Spin"
  936.  
  937.      Cur%=Cur%+1
  938.      IF Cur% > 131 THEN Cur%=128
  939.      CURSOR Cur%
  940.      RETURN
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948. Shareware price for mantissa is $30.00.  
  949.  
  950.      The following is a list of features in Mantissa 3.2.
  951.  
  952.      Mantissa is a message base management utility, that helps SS/Tabby
  953.      sysops maintain the high volume of echo and local mail that enter
  954.      and leave their system.
  955.  
  956.      o Each message section can have a unique:
  957.           o Day limit (0-999)
  958.           o Section Limit (0-999)
  959.           o Archive Limit (0-999k)*
  960.           o Archive Location (any valid path)*
  961.      o Archives can have unique or the same archive paths*
  962.      o nonSection messages are automatically deleted*
  963.      o Global Limit Set Option*
  964.      o Global Day Limit Set Option*
  965.      o Global Archive Limit Set Option*
  966.      o Global Archive Location Set Option*
  967.      o Control 'set' Buttons for Setting unique Pathnames*
  968.      o Multiple ways to move from section to section*
  969.           o List Manager Scroll Feature*
  970.           o Popup Menus*
  971.           o Control Button Forward/Reverse*
  972.           o Menu Commands*
  973.           o Command Keys*
  974.      o On Line Help*
  975.      o Full Support of Mac Interface
  976.      o Delete by Age Only
  977.      o Delete by Limit Only
  978.      o Delete by both Age/Limit
  979.      o Master Archive On/Off switch*
  980.      o Individual Delete/Limit ON/OFF Markers*
  981.      o Renumber Messages*
  982.           o Renumber Forward from message #1*
  983.           o Renumber Reverse from high Message No.*
  984.           o Renumber Userlog, High message last read*
  985.           o Renumber on Specified Dates Only*
  986.      o Use STR's or Text file to save settings.*
  987.      o Network and Remote Maintenance supported
  988.      o Turn Mantissa Log On/Off
  989.      o Select Location and Name of Mantissa Log
  990.      o Epistle Generator
  991.           o On/Off Epistle Generator
  992.           o Max. Message Level Show Clearance
  993.           o Select location/name of Epistle Report
  994.           o Append/Erase Epistle Report
  995.      o Keep .Bak's or discard them*
  996.      o Security marker for High Clearance sections*
  997.      o Major speed boost over 1.0
  998.      o Tabby Compatible or Standalone        * - New in 3.x version
  999.  
  1000.  
  1001. In addition to Mantissa 3.2 Registered users are provided with the 
  1002. updated Export 3.2.  Export is a utility that is essential if you run 
  1003. SS and Tabby.  Export 3.2 has been greatly expanded and turbo charged.
  1004. Sysop are are given extraordinary control over data exported from their 
  1005. system.  Export 3.2, Probe 3.2, PreStamp 3.2 and Sundial 3.2 are only 
  1006. being made available to Registered Mantissa users.
  1007.  
  1008. Options Available in Export 3.2:
  1009.  
  1010.      o Point Message Support*     
  1011.      o Process all/new Messages*
  1012.      o Delete NetMail as Processed
  1013.      o Notify Sysop of Export*
  1014.      o Summary of Last 5 Exports*
  1015.      o Append Origin to Netmail
  1016.      o D'Bridge Areafix support
  1017.      o Turn Log on/off
  1018.      o Select location/name of log
  1019.      o Append directly to Tabby Log
  1020.      o Full support of mac interface
  1021.      o Use Short/Long Reports
  1022.      o Node Alias for Netmail*
  1023.      o Use Generic Echoes/Seenby.bbs files*
  1024.      o Compatible with Origin Master (by Lance Rasmussen)
  1025.      o On Line Help*
  1026.      o Major speed boost over 2.52
  1027.      o Erase/Append to Log*       * - New in 3.x version
  1028.  
  1029.  
  1030. Utilities from, Lininger Technology:
  1031.  
  1032.                    Free to all         Registered Mantissa
  1033. Versions
  1034.  
  1035. Export                2.54                  3.2
  1036. Import                2.53                  2.53 (update soon)
  1037. Sundial               2.1                   3.2
  1038. PreStamp              2.0                   3.2
  1039. Mantissa              1.0 (demo)            3.2
  1040. Probe                  .53                  3.2
  1041. R.Prestamp            2.0                   2.0  (update soon)
  1042. Sapphire              2.1t                  2.1t (update soon)
  1043. Epistle II            1.0                   1.0   
  1044. TPort                 1.0                   1.0
  1045. *Pleiades (1)         -NA-                   .25 (Phase 1 only)
  1046.  
  1047.  
  1048. Special thanks to,
  1049.     Tom Fitzsimmons, Mark Bryant, Lance Rasmussen & Ralph Merritt
  1050. for their great ideas and for risking life and data while beta testing
  1051. the above products.
  1052.  
  1053.  
  1054. Mantissa($30.00):
  1055. Lininger Technology
  1056. Suite 'A'
  1057. 385 Bowling Green Place
  1058. Gahanna, Ohio  43230
  1059. 614-471-6209  226/200
  1060.  
  1061.  
  1062.  
  1063. Applications Freq. from 1:226/200 or 1:350/90
  1064.  
  1065. For General Release:
  1066.  
  1067. Epistle1.sit - Epistle II 1.0
  1068. Export25.sit - Export 2.54
  1069. Import25.sit - Import 2.53
  1070. Mant10.sit   - Mantissa 1.0
  1071. PreStp20.sit - Prestamp 2.0
  1072. Probe.53.sit - Probe .53
  1073. RPreSt20.sit - R.Prestamp (Robot)
  1074. Sapph21t.sit - Sapphire 2.1t
  1075. Sundil21.sit - Sundial 2.1
  1076. TPort10.sit  - TabbyPort 1.0
  1077. TurboT.sit   - TurboPascal launch.next source (original by Pete Johnson)
  1078. ZLaunch.sit  - ZBasic launch.next source code
  1079.  
  1080.                No password required to get the above files
  1081.  
  1082.  
  1083.  
  1084. For Restistered Mantissa Users:
  1085.  
  1086. Export32.sit <password> - Export 3.21
  1087. Mant32.sit   <password> - Mantissa 3.2
  1088. PreStp32.sit <password> - PreStamp 3.2
  1089. Probe32.sit  <password> - Proble 3.2
  1090. Sundil32.sit <Password> - Sundial 3.2
  1091.  
  1092.              <Password> is the first 4 uppercase characters of the filename
  1093.                         mentioned in your Mantissa registration cover letter 
  1094.                         that accompanied your master disk.
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.